package com.ansion.commonchat.contact.systemcontact;

import android.provider.ContactsContract.CommonDataKinds;

import com.ansion.utils.GsonUtil;
import com.ansion.utils.ResourceUtils;

import java.io.Serializable;

public class AndroidContactEmailBean implements Serializable {
    
    
    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    private String address="";
    
    private int type=-1;
    
    private int rowId=-1;
    
    private String label;

	public AndroidContactEmailBean() {
	}
	
    public AndroidContactEmailBean(String address, int type, String label) {
		super();
		this.address = address;
		this.type = type;
		this.label = label;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public CharSequence getLabel() {
		return  CommonDataKinds.Email.getTypeLabel(ResourceUtils.getContext().getResources(), type, label);
	}

	public void setLabel(String label) {
		this.label = label;
	}

    public int getRowId() {
		return rowId;
	}
    
    public void setRowContactId(int rowId) {
		this.rowId = rowId;
	}

    @Override
    public String toString() {
        return GsonUtil.toJson(this);
    }

	
}
